<?python
    from turbogears import identity, database
    from mnemoply import model
?>

<span xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/">
    <table py:if="len(list(model.EducationInfo.selectBy(studentAgreement=obj))) > 0">
        <tbody>
        <tr py:for="info in model.EducationInfo.selectBy(studentAgreement=obj)">
            <td py:if="identity.has_any_permission('dba', 'StudentAgreement/edit')">
                ${ET(tab.edit_widget(database.so_to_dict(info), action=tab.save_action, submit_text=tab.save_action_text))}
            </td>
        </tr>
        </tbody>
    </table>
    <span py:if="len(list(model.EducationInfo.selectBy(studentAgreement=obj))) == 0">
        ${ET(tab.edit_widget(action=tab.add_action, submit_text=tab.add_action_text))}
    </span>
</span>
